<template>
  <div class="child2">
    <h2>我是子组件2:曹丕</h2>
    <button @click="handler">送一台AE86</button>
  </div>
</template>

<script setup lang="ts">
import $bus from "@/bus";

const handler = ()=>{
  $bus.emit('car', {car:'AE86'});
}
</script>

<style scoped>
.child2{
  width: 300px;
  height: 300px;
  background: skyblue;
}
</style>